package com.yuma.string;

import java.util.stream.IntStream;
import java.util.stream.Stream;

public class ExcludeNumberDemo {
    public static void main(String[] args) {
        String string = "a1b2234c243afsaf";
        // 去掉所有数字
        String[] split = string.split("[0-9]");
        System.out.println(String.join("", split));

        String s = string.replaceAll("[0-9]", "");
        System.out.println(s);

        // 流 charStream string.chars()
        IntStream intStream = string.chars().filter(c -> !Character.isDigit(c));
        intStream.forEach(c -> System.out.print((char)c));
    }
}

